package com.itheima.leadnews.feign.article;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.WmNewsDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("leadnews-article")
public interface ArticleFeign {

    @PostMapping("/article/saveArticle")
    public ResponseResult saveArticle(@RequestBody WmNewsDto wmNewsDto);

    @PutMapping("/article/updateStaticUrl")
    public ResponseResult updateStaticUrl(@RequestParam("articleId") Long id, @RequestParam("url")String url);
}
